package com.hxx;

import org.slf4j.Logger;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.core.env.ConfigurableEnvironment;

@SpringBootApplication
@EnableDiscoveryClient
public class GatewayApplication {

    private static final Logger logger = org.slf4j.LoggerFactory.getLogger(GatewayApplication.class);

    public static void main(String[] args) {
        //org.springframework.boot.SpringApplication.run(GatewayApplication.class, args);
        SpringApplication application = new SpringApplication(GatewayApplication.class);
        ConfigurableEnvironment environment = application.run(args).getEnvironment();
        logger.info("网关启动成功！！");
        logger.info("网关地址: \t" + environment.getProperty("server.port"));
    }
}
